﻿using System;
using System.Collections.Generic;
using Eamon.MeituanDotnetSDK.api.common.request;
using Eamon.MeituanDotnetSDK.api.oauth.@enum;

namespace Eamon.MeituanDotnetSDK.api.oauth.entity
{
    public class AuthorizePlatformRequest : BaseOAuthRequest
    {
        public AuthorizePlatformRequest()
        {
        }
        public AuthorizePlatformRequest(int businessId, String app_secret):base(businessId)
        {
            this.app_secret = app_secret;
        }
        private string app_secret;
        private string grant_type= GetGrantTypeEnumValue(GrantType.AUTHORIZE_PLATFORM);

        public override Dictionary<string, object> toParams()
        {
            Dictionary< string, object > parameters = new Dictionary<string,object>();
            if (app_secret != null)
            {
                parameters.Add("app_secret", app_secret);
            }
            if (grant_type != null)
            {
                parameters.Add("grant_type", grant_type);
            }
            return parameters;
        }

    }
}
